package com.jvyou.app.ds.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 驾校题目表(Question)表实体类
 *
 * @author 橘柚
 * @since 2025-04-20 20:57:29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("ds_question")
public class Question implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 题目类型ID，关联ds_question_type表
     */
    @TableField("type_id")
    private Long typeId;

    /**
     * 驾照类型ID
     */
    @TableField("license_type_id")
    private Long licenseTypeId;

    /**
     * 科目ID
     */
    @TableField("course_type_id")
    private Long courseTypeId;

    /**
     * 1-单选 2-多选3判断
     */
    @TableField("question_type")
    private String questionType;

    /**
     * 题目内容
     */
    @TableField("content")
    private String content;

    /**
     * 题目图片URL(可为空)
     */
    @TableField("content_image")
    private String contentImage;

    /**
     * 题目解析
     */
    @TableField("explanation")
    private String explanation;

    /**
     * 考点
     */
    @TableField("key_point")
    private String keyPoint;

    /**
     * 是否新规题0是1否
     */
    @TableField("is_new_rule")
    private String isNewRule;

    /**
     * 是否热门题0是1否
     */
    @TableField("is_hot")
    private String isHot;

    /**
     * 难度 1-简单 2-中等 3-困难
     */
    @TableField("difficulty")
    private String difficulty;

    /**
     * 状态 0-禁用 1-启用
     */
    @TableField("status")
    private String status;

    /**
     * 题目来源，local本地题库，ai人工智能生成
     */
    @TableField("source")
    private String source;

    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 更新人
     */
    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 驾照类型代码(如C1、C2、A1等)
     */
    @TableField(exist = false)
    private String licenseTypeCode;

    /**
     * 驾照类型名称
     */
    @TableField(exist = false)
    private String licenseTypeName;

    /**
     * 驾照类型名称
     */
    @TableField(exist = false)
    private String licenseTypColor;

    /**
     * 科目名称
     */
    @TableField(exist = false)
    private String courseSubjectName;

    /**
     * 科目名称
     */
    @TableField(exist = false)
    private String courseSubjectColor;

    /**
     * 类别名称
     */
    @TableField(exist = false)
    private String questionTypeName;
}
